package com.imddy.gkrpc.server;

import com.imddy.gkrpc.Request;
import com.imddy.gkrpc.common.utils.ReflectionUtils;

public class ServiceInvoker {

	public Object invoke(ServiceInstance serviceInstance, Request request) {
		
		return ReflectionUtils.invoke(
				serviceInstance.getTarget(), 
				serviceInstance.getMethod(),
				request.getParameters()
		);
	}
	
}
